package com.rxmvp.baselibrary.rxretrofit.subscriber;


import com.rxmvp.baselibrary.rxretrofit.response.BaseResponse;
import com.rxmvp.baselibrary.rxretrofit.response.ResponseUtil;

/**
 * 作者： huangRZ on 2017/1/21. 15:04
 * 邮箱：917647409@qq.com
 */
public abstract class ResponseSubscriber<T extends BaseResponse> extends BaseSubscriber<T> {

    @Override
    public void onNext(T response) {
        if (ResponseUtil.IsNormal(response)) {
            onSuccess(response);
        }
    }

    public abstract void onSuccess(T response);

}
